//
//  NSString+CNToEn.m
//  开源中国
//
//  Created by hcios on 17/1/17.
//  Copyright © 2017年 鹿林. All rights reserved.
//

#import "NSString+CNToEn.h"

@implementation NSString (CNToEn)


+(NSString *)fromLan:(NSString *)fromLan{

    NSString * toLan;
    if ([fromLan isEqualToString:@"自动检测"]) {
        toLan = @"auto";
    }
    if ([fromLan isEqualToString:@"中文"]) {
        toLan = @"zh";
    }
    if ([fromLan isEqualToString:@"英语"]) {
        toLan = @"en";
    }
    if ([fromLan isEqualToString:@"粤语"]) {
        toLan = @"yue";
    }
    if ([fromLan isEqualToString:@"文言文"]) {
        toLan = @"wyw";
    }
    if ([fromLan isEqualToString:@"日语"]) {
        toLan = @"jp";
    }
    if ([fromLan isEqualToString:@"韩语"]) {
        toLan = @"kor";
    }
    if ([fromLan isEqualToString:@"法语"]) {
        toLan = @"fra";
    }
    if ([fromLan isEqualToString:@"西班牙语"]) {
        toLan = @"spa";
    }
    if ([fromLan isEqualToString:@"泰语"]) {
        toLan = @"th";
    }
    if ([fromLan isEqualToString:@"阿拉伯语"]) {
        toLan = @"ara";
    }
    if ([fromLan isEqualToString:@"俄语"]) {
        toLan = @"ru";
    }
    if ([fromLan isEqualToString:@"葡萄牙语"]) {
        toLan = @"pt";
    }
    if ([fromLan isEqualToString:@"德语"]) {
        toLan = @"de";
    }
    if ([fromLan isEqualToString:@"意大利语"]) {
        toLan = @"it";
    }
    if ([fromLan isEqualToString:@"希腊语"]) {
        toLan = @"el";
    }
    if ([fromLan isEqualToString:@"荷兰语"]) {
        toLan = @"nl";
    }
    if ([fromLan isEqualToString:@"波兰语"]) {
        toLan = @"pl";
    }
    if ([fromLan isEqualToString:@"保加利亚语"]) {
        toLan = @"bul";
    }
    if ([fromLan isEqualToString:@"爱沙尼亚语"]) {
        toLan = @"est";
    }
    if ([fromLan isEqualToString:@"丹麦语"]) {
        toLan = @"dan";
    }
    if ([fromLan isEqualToString:@"芬兰语"]) {
        toLan = @"fin";
    }
    if ([fromLan isEqualToString:@"捷克语"]) {
        toLan = @"cs";
    }
    if ([fromLan isEqualToString:@"罗马尼亚语"]) {
        toLan = @"rom";
    }
    if ([fromLan isEqualToString:@"斯洛文尼亚语"]) {
        toLan = @"slo";
    }
    if ([fromLan isEqualToString:@"瑞典语"]) {
        toLan = @"swe";
    }
    if ([fromLan isEqualToString:@"匈牙利语"]) {
        toLan = @"hu";
    }
    if ([fromLan isEqualToString:@"繁体中文"]) {
        toLan = @"cht";
    }
    if ([fromLan isEqualToString:@"越南语"]) {
        toLan = @"vie";
    }
    return toLan;
}

@end
